package com.kis.pojo;

/**
 * Created by yks on 15-11-17.
 */
public class Order {
    private Long id;
    private String orderName;
    private String address;
    private String createDate;
    private String total;
    private String persionName;
    private String tel;

    public Order(OrderBuilder orderBuilder) {
        this.id = id;
        this.orderName = orderBuilder.getOrderName();
        this.address = orderBuilder.getAddress();
        this.createDate = orderBuilder.getCreateDate();
        this.total = orderBuilder.getTotal();
        this.persionName = orderBuilder.getPersionName();
        this.tel = orderBuilder.getTel();
    }

    public static class OrderBuilder {
        private String orderName;
        private String address;
        private String createDate;
        private String total;
        private String persionName;
        private String tel;

        public OrderBuilder(String orderName) {
            this.orderName = orderName;
        }

        public String getOrderName() {
            return orderName;
        }

        public OrderBuilder setOrderName(String orderName) {
            this.orderName = orderName;
            return this;
        }

        public String getAddress() {
            return address;
        }

        public OrderBuilder setAddress(String address) {
            this.address = address;
            return this;
        }

        public String getCreateDate() {
            return createDate;
        }

        public OrderBuilder setCreateDate(String createDate) {
            this.createDate = createDate;
            return this;
        }

        public String getTotal() {
            return total;
        }

        public OrderBuilder setTotal(String total) {
            this.total = total;
            return this;
        }

        public String getPersionName() {
            return persionName;
        }

        public OrderBuilder setPersionName(String persionName) {
            this.persionName = persionName;
            return this;
        }

        public String getTel() {
            return tel;
        }

        public OrderBuilder setTel(String tel) {
            this.tel = tel;
            return this;
        }

        public Order build() {
            return new Order(this);
        }
    }
}
